﻿using RoadQualityEvaluatorData.Domain.Entities;
using RoadQualityEvaluatorData.DomainServices.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace RoadQualityEvaluatorData.DomainServices.Repositories
{
    public class LocationRepository : Repository<Location>
    {
        public LocationRepository()
            : base()
        {
        }

        public LocationRepository(UnitOfWork uo) : base(uo)
        {
        }

        public Location GetLocationByLatitudeLongitude(double latitude, double longitude)
        {
            var all = this.GetAll();
            var loc = all.Where(l => l.Latitude == latitude && l.Longitude == longitude).FirstOrDefault();
            return loc;
        }

    }

}